package com.seal.tsms.system.entity;

import java.io.Serializable;

/**
 * Created by seal.jing on 2016/1/5.
 */
public class ResourceRolePk implements Serializable {
    private SystemResource resource;
    private SystemRole role;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ResourceRolePk that = (ResourceRolePk) o;

        if (!resource.equals(that.resource)) return false;
        return role.equals(that.role);

    }

    @Override
    public int hashCode() {
        int result = resource.hashCode();
        result = 31 * result + role.hashCode();
        return result;
    }

    public SystemResource getResource() {
        return resource;
    }

    public void setResource(SystemResource resource) {
        this.resource = resource;
    }

    public SystemRole getRole() {
        return role;
    }

    public void setRole(SystemRole role) {
        this.role = role;
    }
}
